import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User:xieChao
 * Date:2022/10/5 14:21
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree = new BinaryTree();
        TreeNode root = binaryTree.createTree();
        binaryTree.preOrder(root);
        System.out.println();
        binaryTree.midOrder(root);
        System.out.println();
        binaryTree.postOrder(root);
        System.out.println();
        System.out.println(binaryTree.getLeafNodeCount1(root));
        System.out.println(binaryTree.getKLeveNodeCount(root,3));
        System.out.println(binaryTree.getHight(root));
        try{
            System.out.println(binaryTree.find(root,'G').val);
        }catch (NullPointerException e){
            e.printStackTrace();
            System.out.println("无此结点");
        }
        System.out.println(binaryTree.isCompleteTree(root));
    }
}
